using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Read.Application.Command.SalesOrder
{
    /// <summary>
    /// 查询销售订单产品明细命令
    /// </summary>
    public class QuerySalesOrderProductCommand : IRequest<ApiResult<ApiPageing<SalesOrderProductDTO>>>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 销售订单ID
        /// </summary>
        public int SalesOrderId { get; set; }
    }

    /// <summary>
    /// 销售订单产品明细DTO
    /// </summary>
    public class SalesOrderProductDTO
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 销售订单ID
        /// </summary>
        public int SalesOrderId { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        public string ProductCode { get; set; } = string.Empty;

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; } = string.Empty;

        /// <summary>
        /// 产品规格
        /// </summary>
        public string? ProductSpec { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        public string WorkOrderNo { get; set; } = string.Empty;

        /// <summary>
        /// 订单数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 完成数量
        /// </summary>
        public int CompletedQuantity { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreatorName { get; set; } = string.Empty;
    }
}
